﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class PopUpPage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        NewsDataClassesDataContext dc = new NewsDataClassesDataContext();
        int id=Convert.ToInt16(Request["id"]);
        if (id==3 || id==4)
        {
            var OtherInfo = from OtherInfos in dc.OtherInfos
                            where OtherInfos.OtherInfo_id.Equals(id) && OtherInfos.isPublished.Equals(1)
                            select new
                            {
                                标题 = OtherInfos.Title,
                                内容 = OtherInfos.Content
                            };

            foreach (var otherInfo in OtherInfo)
            {
                News_Title.Text = Convert.ToString(otherInfo.标题);
                News_Content.Text = Convert.ToString(otherInfo.内容);
            }
        }
        dc.Dispose();
    }
}
